/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.model;


import com.employee.controller.EmployeeBeanRemote;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.naming.InitialContext;
import javax.naming.NamingException;

/**
 *
 * @author Chung
 */
public class LoginModel {
    

    public LoginModel() {
        
    }
    public String loginControl(String username, String password){
        try {
            InitialContext ictx = new InitialContext();
            EmployeeBeanRemote remote =(EmployeeBeanRemote) ictx.lookup("java:global/BluePumpkinEJB/EmployeeBean!com.employee.controller.EmployeeBeanRemote");
            return remote.loginControl(username, password);
        } catch (NamingException ex) {
            Logger.getLogger(LoginModel.class.getName()).log(Level.SEVERE, null, ex);
        }
        return null;
    }
    
}
